package com.hanamaki.basic.struct;

import java.util.Scanner;

public class For5 {

//     main 方法
    public static void main(String[] args) {

        for (int j = 1/*初始值*/;; j++ /*循环迭代*/) {

            /*循环体*/

            System.out.println("请输入第" + j + "个课程的成绩");
            Scanner scanner = new Scanner(System.in);
            double i = scanner.nextDouble();

            if (i < 0) {
                System.out.println("停止录入!录入错误");
                break;
            }

        }

    }

}
